# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=raptor2
pkgver=2.0.16
pkgrel=1
pkgdesc="RDF parser toolkit for Redland"
url="https://librdf.org/raptor"
arch="all"
license="LGPL-2.1-or-later"
depends_dev="curl-dev libxml2-dev libxslt-dev yajl-dev"
makedepends="$depends_dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://download.librdf.org/source/raptor2-$pkgver.tar.gz
	libxml-2.11.0.patch
	"

case "$CARCH" in
s390x)
	# Checking issue-37.trig FAILED returned status 132
	options="$options !check"
	;;
esac

# secfixes:
#   2.0.15-r3:
#     - CVE-2020-25713
#   2.0.15-r2:
#     - CVE-2017-18926

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--target=$CTARGET \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

check() {
	make -j1 check
}

package() {
	make DESTDIR="$pkgdir" install
}
sha512sums="
9bd5cff36390e1e0ef15ac56e5413ecfceb4018cb531a4da8850d3623615f12a93690a78be61f9d9ae7a24e16f6446e356bc2b7f34051ddc077761d85a9b7c44  raptor2-2.0.16.tar.gz
b8fbe6bd1f473693851b7eff70075b651e7a32b309c4d9274be5b8a9276e089ff051ad192ebb303c07a33818b1549fd100164d2a32a120f5c92fb438cc1df04d  libxml-2.11.0.patch
"
